package com.cloud.pay.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 支付订单表
 * </p>
 *
 * @author wenjin
 * @since 2019-12-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("pay_payment")
public class Payment implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 应用ID
     */
    @TableField("app_id")
    private String appId;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private String userId;

    /**
     * 订单号
     */
    @TableField("order_no")
    private String orderNo;

    /**
     * 交易号
     */
    @TableField("trade_no")
    private String tradeNo;

    /**
     * 交易类型：1表示扫码支付，2表示JSAPI支付，3表示APP支付
     */
    @TableField("trade_type")
    private Integer tradeType;

    /**
     * 支付渠道：1表示微信，2表示支付宝
     */
    @TableField("pay_channel")
    private Integer payChannel;

    /**
     * 支付金额（单位为分）
     */
    @TableField("pay_money")
    private Integer payMoney;

    /**
     * 支付标题
     */
    @TableField("pay_title")
    private String payTitle;

    /**
     * 支付状态：0表示未支付，1表示支付成功，2表示支付失败
     */
    @TableField("pay_status")
    private Integer payStatus;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    private Date updateTime;


    public static final String ID = "id";

    public static final String APP_ID = "app_id";

    public static final String USER_ID = "user_id";

    public static final String ORDER_NO = "order_no";

    public static final String TRADE_NO = "trade_no";

    public static final String TRADE_TYPE = "trade_type";

    public static final String PAY_CHANNEL = "pay_channel";

    public static final String PAY_MONEY = "pay_money";

    public static final String PAY_TITLE = "pay_title";

    public static final String PAY_STATUS = "pay_status";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

}
